package com.biz.primus.ms.sms.event;

import com.biz.primus.model.misc.exception.ProviderNotAvailableException;
import com.biz.primus.model.misc.vo.ShortMessageVo;
import com.biz.primus.ms.sms.service.model.ServiceProvider;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * @author yanweijin
 * @date 2017/5/30
 */
@Getter
public class ProviderNotAvailableEvent extends ApplicationEvent {

    private final ServiceProvider provider;

    private final ProviderNotAvailableException exception;

    private final ShortMessageVo shortMessageVo;

    public ProviderNotAvailableEvent(Object source, ShortMessageVo sm,
                                     ServiceProvider provider, ProviderNotAvailableException ex) {
        super(source);
        this.shortMessageVo = sm;
        this.provider = provider;
        this.exception = ex;
    }

}
